package com.yager.util;

import org.thymeleaf.util.StringUtils;

import java.io.File;
import java.util.Arrays;
import java.util.List;

public class FilesUtil {
    public static File[] getAllFile(String dirFilePath){
        File file = new File("D://img/" + dirFilePath);
        System.out.println("what happened!");
        File[] files = file.listFiles();
        System.out.println(files);
        System.out.println("目录下的对象个数：" + files.length);
        for(int i = 0; i < files.length; i++){
            if(files[i].isFile()){
                System.out.println("文件" + files[i]);
            }
        }
        return files;
    }

}
